﻿
var callobj;
function $(objname){return document.getElementById(objname);}

// 评论审核
function CommentState(ID){
	callobj = $("CommentState" + ID);
	makeRequest("Inc/_Manage.Ajax.Asp?Act=CommentState&ID=" + ID + "&Rand=" + Math.random(),"ReturnInnerHTML","get","");
}
// 评论回复框
function ReComment(ID){
	if($("ReCommentState" + ID).innerHTML==''){
		callobj = $("ReComment" + ID);
		makeRequest("Inc/_Manage.Ajax.Asp?Act=ReComment&ID=" + ID + "&Rand=" + Math.random(),"ReturnInnerHTML","get","");
		$("ReCommentState" + ID).innerHTML='1';
	} else {
		ReCommentSave(ID,'','');
	}
}
// 保存评论回复
function ReCommentSave(ID,ReVal,SaveIT){
	callobj = $("ReComment" + ID);
	makeRequest("Inc/_Manage.Ajax.Asp?Act=ReCommentSave&ID=" + ID + "&SaveIT=" + escape(SaveIT) + "&oRecomment=" + escape(ReVal) + "&Rand=" + Math.random(),"ReturnInnerHTML","get","");
	$("ReCommentState" + ID).innerHTML=''; // 回复评论关闭
}
// AJAX 响应
function ReturnInnerHTML(){
	if (http_request.readyState == 4) {
		if (http_request.status == 200){
			var vback=http_request.responseText.split('|');
			if(vback[0]=='False'){alert(vback[1]);}else{callobj.innerHTML=vback[1];}
		}
	}
}